#!/bin/bash

rm ~/.zshrc
sudo rm -R ~/.oh-my-zsh

# Ubuntu 安装 oh my zsh 脚本
sudo apt update && sudo apt install zsh -y

rm install*.sh
wget https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh

sed 's/REPO:-ohmyzsh\/ohmyzsh/REPO:-mirrors\/oh-my-zsh/g' install.sh > install.1.sh
sed 's/REMOTE:-https:\/\/github.com/REMOTE:-https:\/\/gitee.com/g' install.1.sh > install.2.sh
sed 's/read -r opt/opt="Y"/g' install.2.sh > install.3.sh

sudo chmod +x *.sh && ./install.3.sh